// Package broker defines the message broker interface for GoCelery
package broker

// Broker is the interface for message brokers (RabbitMQ, Redis, etc.)
type Broker interface {
	// Initialize the broker connection
	Initialize(url string) error

	// Close the broker connection
	Close() error

	// Send a task message to a queue
	SendMessage(queue string, message []byte) error

	// Receive messages from a queue
	ConsumeMessages(queue string) (<-chan []byte, error)

	// Acknowledge message processing
	Ack(messageID string) error

	// Reject a message
	Reject(messageID string, requeue bool) error
}
